home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / System / Docu / XYplane (.txt) < prev   
Encoding:
Oberon Document  |  1994-06-07  |  2.9 KB  |  56 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Geneva
  22. Geneva
  23. 8.4 XYplane
  24. DEFINITION XYplane;
  25.     CONST erase = 0; draw = 1;
  26.     VAR X, Y, W, H: INTEGER;
  27.     PROCEDURE Open;
  28.     PROCEDURE Dot (x, y, mode: INTEGER);
  29.     PROCEDURE IsDot (x, y: INTEGER): BOOLEAN;
  30.     PROCEDURE ReadKey (): CHAR;
  31.     PROCEDURE Clear;
  32. END XYplane.
  33. This module is provided for compatibility with the book "Programming in Oberon" (-> "Bibliography"). It is useful when learning the language. It is not recommended for use in production programs.
  34. CONST erase
  35. This value can be passed to parameter mode in procedure Dot. It indicates that a white dot should be placed at the given coordinates.
  36. CONST draw
  37. This value can be passed to parameter mode in procedure Dot. It indicates that a white dot should be placed at the given coordinates.
  38. VAR X, Y, W, H
  39. These values define the rectangle in which drawing occurs. (X, Y) is the lower-left corner of the rectangle, (W, H) its size. In Oberon/F, (X, Y) is always (0, 0). Unlike the port model of Oberon/F, XYplane has its origin at the lower-left corner of the drawing area, and positive Y values above the origin.
  40. PROCEDURE Open
  41. Opens a new window for drawing. The window's contents is cleared to white.
  42. PROCEDURE Dot (x, y, mode: INTEGER)
  43. Draws a white dot (mode = erase) or a black dot (mode = draw).
  44. PROCEDURE IsDot (x, y: INTEGER): BOOLEAN
  45. Returns whether the dot at (x, y) is white (FALSE) or black (TRUE).
  46. PROCEDURE ReadKey (): CHAR
  47. If a key has been pressed, it is returned as result. Otherwise, 0X is returned.
  48. PROCEDURE Clear
  49. Erases the whole drawing area (setting it to white).
  50. TextControllers.StdCtrlDesc
  51. TextControllers.ControllerDesc
  52. Containers.ControllerDesc
  53. Controllers.ControllerDesc
  54. Geneva
  55. Documents.ControllerDesc
  56.